package PracticasPL.practica7;

import java.io.IOException;

import org.antlr.runtime.ANTLRFileStream;
import org.antlr.runtime.CommonTokenStream;
import org.antlr.runtime.RecognitionException;



/**
 * Hello world!
 *
 */
public class Procesador 
{
    public static void main( String[] args )
    {
    	 try {
    			YACCLexer lex = new YACCLexer(new ANTLRFileStream(args[0]));
    			CommonTokenStream tokens = new CommonTokenStream(lex);
    			
    			YACCParser parser = new YACCParser(tokens);
    			parser.yacc();
    			System.out.println("Fichero procesado correctamente");
    		} catch (IOException e) {
    			// TODO Auto-generated catch block
    			e.printStackTrace();
    		} catch (RecognitionException e) {
    			// TODO Auto-generated catch block
    			e.printStackTrace();
    		}
   	    }
   }

